<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />

<!-- blueprint CSS framework -->
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css"
	media="screen, projection" />
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css"
	media="print" />
        <!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
<link rel="stylesheet" type="text/css"
	href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body bgcolor="YELLOW">

	<div class="container" id="page">

		<div id="header">
			
			<div id="logo">
				<img src=".\images\logoSS.png" width=150> <?php echo CHtml::encode(Yii::app()->name); ?>
			
			</div>
		</div>
		<!-- header -->

		<div id="mainmenu">
		<?php 
                    $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
                            array('label'=>'Inicio', 'url'=>array('/site/index')),
                            array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                            array('label'=>'Diseño','url'=>array('/diseno/index'), 'visible'=>!Yii::app()->user->isGuest  and (Yii::app()->user->rol=='Diseñador'  or Yii::app()->user->rol=='Administrador')),
                            array('label'=>'Publicacion','url'=>array('/publicacion/index'), 'visible'=>!Yii::app()->user->isGuest  and (Yii::app()->user->rol=='Administrador')),
                            array('label'=>'Digitalizacion','url'=>array('/digitalizacion/index'), 'visible'=>!Yii::app()->user->isGuest and (Yii::app()->user->rol=='Digitador' or Yii::app()->user->rol=='Administrador')),
                            //array('label'=>'Visualizacion de Datos','url'=>array('/visualizacion/index'), 'visible'=>!Yii::app()->user->isGuest),
                            array('label'=>'Administración', 'url'=>array('/administracion/index'), 'visible'=>!Yii::app()->user->isGuest and Yii::app()->user->rol=='Administrador'),
                            //array('label'=>'Diseñar Encuesta','url'=>array('/encuesta/index'), 'visible'=>!Yii::app()->user->isGuest  and (Yii::app()->user->rol=='Diseñador'  or Yii::app()->user->rol=='Administrador')),
                            (Yii::app()->user->isGuest)?array('label'=>'Logout ('.Yii::app()->user->id.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest):array('label'=>'Logout ('.Yii::app()->user->nombre.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
                            
                            ),
                        )   
                    ); 
                ?>
		</div>
		<!-- mainmenu -->
		<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?>
		<!-- breadcrumbs -->
		<?php endif?>

		<?php echo $content; ?>

		<div id="footer">
			Copyright &copy;
			<?php echo date('Y'); ?>
			by My Company.<br /> All Rights Reserved.<br />
			Powered by SOSI
		</div>
		<!-- footer -->

	</div>
	<!-- page -->

</body>
</html>
